import java.util.Random;
import java.util.Scanner;
public class caiShuZi{
        public static void main(String[] args){
            Random ran=new Random();
            int num=ran.nextInt(100)+1;
            while(true){
                Scanner sc=new Scanner(System.in);
                System.out.println("请输入你要猜的数字");
                int guessNumber=sc.nextInt();
                if(guessNumber>num){
                    System.out.println("你猜的数字"+guessNumber+"大了");
                }    else if(guessNumber==num){
                    System.out.println("你猜对了");
                    break;
                }else{
                    System.out.println("你猜小了");
                }
            }
        }
    }

